ProductTradingStatusV2
This table contains live trading status records for entire product groups (futures and options) and asset groups and individual instruments
METADATA
Attribute | Value |
---|---|
Topic | 4440-product-status |
MLink Token | ClientLive |
Product | SRLive |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
secKey_at | enum - AssetType | PRI | 'None' | trading status product key Interpretation depends on the status type |
secKey_ts | enum - TickerSrc | PRI | 'None' | trading status product key Interpretation depends on the status type |
secKey_tk | VARCHAR(12) | PRI | '' | trading status product key Interpretation depends on the status type |
secKey_yr | SMALLINT UNSIGNED | PRI | 0 | trading status product key Interpretation depends on the status type |
secKey_mn | TINYINT UNSIGNED | PRI | 0 | trading status product key Interpretation depends on the status type |
secKey_dy | TINYINT UNSIGNED | PRI | 0 | trading status product key Interpretation depends on the status type |
secKey_xx | DOUBLE | PRI | 0 | trading status product key Interpretation depends on the status type |
secKey_cp | enum - CallPut | PRI | 'Call' | trading status product key Interpretation depends on the status type |
secType | enum - SpdrKeyType | PRI | 'None' | |
tradingStatusType | enum - TradingStatusType | PRI | 'None' | Processing level for the product trading status 1 statusKey is the product group key 2 statusKey is the security group key statusKey is for an individual instrument |
tradeDate | DATE | '1900-01-01' | ||
marketStatus | enum - MarketStatus | 'None' | market status open halted etc | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | time of last state update CST |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
secKey_tk | 1 |
secKey_yr | 2 |
secKey_mn | 3 |
secKey_dy | 4 |
secKey_xx | 5 |
secKey_cp | 6 |
secKey_at | 7 |
secKey_ts | 8 |
secType | 9 |
tradingStatusType | 10 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRLive`.`MsgProductTradingStatusV2` (
`secKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'trading status product key. Interpretation depends on the status type',
`secKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'trading status product key. Interpretation depends on the status type',
`secKey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'trading status product key. Interpretation depends on the status type',
`secKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'trading status product key. Interpretation depends on the status type',
`secKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'trading status product key. Interpretation depends on the status type',
`secKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'trading status product key. Interpretation depends on the status type',
`secKey_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'trading status product key. Interpretation depends on the status type',
`secKey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'trading status product key. Interpretation depends on the status type',
`secType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`tradingStatusType` ENUM('None','ProductGroup','SecurityGroup','Instrument') NOT NULL DEFAULT 'None' COMMENT 'Processing level for the product trading status: 1 = statusKey is the product group key, 2 = statusKey is the security group key, statusKey is for an individual instrument',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`marketStatus` ENUM('None','PreOpen','PreCross','Cross','Open','Closed','Halted','AfterHours') NOT NULL DEFAULT 'None' COMMENT 'market status (open, halted, etc)',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'time of last state update (CST)',
PRIMARY KEY USING HASH (`secKey_tk`,`secKey_yr`,`secKey_mn`,`secKey_dy`,`secKey_xx`,`secKey_cp`,`secKey_at`,`secKey_ts`,`secType`,`tradingStatusType`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='This table contains live trading status records for entire product groups (futures and options) and asset groups and individual instruments';
SELECT TABLE EXAMPLE QUERY
SELECT
`secKey_at`,
`secKey_ts`,
`secKey_tk`,
`secKey_yr`,
`secKey_mn`,
`secKey_dy`,
`secKey_xx`,
`secKey_cp`,
`secType`,
`tradingStatusType`,
`tradeDate`,
`marketStatus`,
`timestamp`
FROM `SRLive`.`MsgProductTradingStatusV2`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`secKey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`secKey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`secKey_tk` = 'Example_secKey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`secKey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_dy` = 1
AND
/* Replace with a DOUBLE */
`secKey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`secKey_cp` = 'Call'
AND
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`secType` = 'None'
AND
/* Replace with a ENUM('None','ProductGroup','SecurityGroup','Instrument') */
`tradingStatusType` = 'None';
Doc Columns Query
SELECT * FROM SRLive.doccolumns WHERE TABLE_NAME='ProductTradingStatusV2' ORDER BY ordinal_position ASC;